package com.stepforward.me;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import java.util.List;
import android.graphics.drawable.Drawable;
import android.location.Address;
import android.location.Geocoder;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Toast;
import android.widget.ZoomControls;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;
import java.io.IOException;
import java.util.Locale;


public class mapViewer extends MapActivity {
	static final int INITIAL_ZOOM_LEVEL = 17;
	static final int INITIAL_LATITUDE = 25040255;
	static final int INITIAL_LONGITUDE = 121512377;
	MapView mapView;
	List<Overlay> mapOverlays;
	Drawable drawable;
	ItemizedOverlayer itemizedOverlay;
        LinearLayout linearLayout;
        ZoomControls mZoom;
        int lati,longi;
        GeoPoint p;
        EventDataSQLHelper eventsData;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.map);

        mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
        
        
        eventsData = new EventDataSQLHelper(this);
        
        mapOverlays = mapView.getOverlays();
        drawable = this.getResources().getDrawable(R.drawable.androidmarker);
        itemizedOverlay = new ItemizedOverlayer(drawable);
        GeoPoint point = new GeoPoint((int)(lati * 1E6),(int)(longi*1E6));
        OverlayItem overlayitem = new OverlayItem(point, "", "");
        GeoPoint point2 = new GeoPoint(35410000, 139460000);
        OverlayItem overlayitem2 = new OverlayItem(point2, "Sekai, konichiwa!", "I'm in Japan!");
 
        itemizedOverlay.addOverlay(overlayitem);
        itemizedOverlay.addOverlay(overlayitem2);
        mapOverlays.add(itemizedOverlay);
        
       
    }



    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        // use layout to "inflate" the menu
        getMenuInflater().inflate(R.layout.menu, menu);
        // note the option "previous" is disable in the XML layout
        return true;
    }


    @Override
    protected boolean isRouteDisplayed() {
        return false;
    }

}
